<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>创建商品</title>
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="css/base.css" type="text/css" rel="stylesheet" />
<link href="css/main.css" type="text/css" rel="stylesheet" />
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/TouchSlide.1.1.js"></script>
<script type="text/javascript">
function validate(){
	if(form.name.value==""){
		alert("商品名不能为空");	
		return false;
	}
	if(form.description.value==""){
		alert("描述不能为空");	
		return false;
	}
	if(form.price.value==""){
		alert("价格不能为空");	
		return false;
	}
	if(form.count.value==""){
		alert("数量不能为空");	
		return false;
	}
	if(form.image.value==""){
		alert("照片不能为空");
		return false;
	}
}
</script>
</head>
<body>
      <form enctype="multipart/form-data" action="Create" method="post" onsubmit="return validate();" name="form">
      <div style="width:450px; margin:60px auto;">
     <h1 style="color:blue;font-size:30px">创建商品</h1>
     <br>
        <p>商品名：<input type="text" name="name"></p><br>
        <p>描述：     <textarea rows="5" cols="20" id="description" name="description"></textarea></p><br>
        <p>价格：     <input type="text" name="price"></p><br>
        <p>数量：     <input type="text" name="count"></p><br>
        <p>上传图片：<input type="file" name="image"></p><br>
        <input type="submit" value="提交">
        <input type="button" value="返回" onclick="window.location.href='index.html';">
     </div>
      </form>
    

</body>
</html>